<%@ page import="java.util.*" %>
<%@ page import="com.opensymphony.xwork2.ActionContext" %>
<%--
  Created by IntelliJ IDEA.
  User: CDuiDui
  Date: 2021/10/30
  Time: 15:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.kmu.lwl.controller.AlterController" %>
<%@ page import="java.util.List" %>
<%@ page import="com.kmu.lwl.entiy.Student" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>Free Bootstrap Admin Template : Dream</title>
    <!-- Bootstrap Styles-->
    <link href="css/bootstrap.css" rel="stylesheet"/>
    <!-- FontAwesome Styles-->
    <link href="css/font-awesome.css" rel="stylesheet"/>
    <!-- Morris Chart Styles-->
    <link href="js/morris/morris-0.4.3.min.css" rel="stylesheet"/>
    <!-- Custom Styles-->
    <link href="css/custom-styles.css" rel="stylesheet"/>
    <!-- Google Fonts-->
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
</head>

<body>
<div id="wrapper">
    <nav class="navbar navbar-default top-navbar" role="navigation">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">

            </button>
            <a class="navbar-brand" href="index.html">学生选课系统</a>
        </div>

        <ul class="nav navbar-top-links navbar-right">
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">

                </a>

                <!-- /.dropdown-messages -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">

                </a>

                <!-- /.dropdown-tasks -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">

                </a>

                <!-- /.dropdown-alerts -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">

                </a>

                <!-- /.dropdown-user -->
            </li>
            <!-- /.dropdown -->
        </ul>
    </nav>
    <!--/. NAV TOP  -->
    <nav class="navbar-default navbar-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="main-menu">

                <li>
                    <a class="active-menu" href="select.action">查询个人信息</a>
                </li>
                <li>
                    <a href="studentInfo.action">修改个人信息</a>
                </li>
                <li>
                    <a href="personalCourse.action">个人选课情况</a>
                </li>
                <li>
                    <a href="allCourse.action"></i>所有课程信息</a>
                </li>
            </ul>
        </div>


    </nav>
    <%--    <s:set var="student" value="#request.updateStudent"></s:set>--%>
        <%
        Map s = (Map) ActionContext.getContext().getSession();
        Student stu = (Student) s.get("updateStudent");
    %>
    <s:form action="studentUpdate" method="post">
        <table class="x">
            <tr>
                <td class="x_td_th1">学号：</td>
                <td class="x_td_th2">
<%--                    <s:textfield value="" name="student.sId"></s:textfield>--%>
                    <input name="student.id" value="<%=stu.getId()%>" type="text">
                </td>
            </tr>
            <tr>
                <td class="x_td_th1"> 姓名：</td>
                <td class="x_td_th2"><input name="student.name" value="<%=stu.getName()%>"></td>
            </tr>
            <tr>
                <td class="x_td_th1"> 性别：</td>
                <td class="x_td_th2">
                    <%--    <s:radio list="#{1:'男',0:'女'}" value="<%=stu.getsGender()%>" label="性别" name="student.sGender"></s:radio>--%>
                    <input type="radio" name="student.gender" value="1"/>男
                    <input type="radio" name="student.gender" value="0"/>女
                </td>
            </tr>
            <tr>
                <td class="x_td_th1"> 专业：</td>
                <td class="x_td_th2"><select name="student.majorId">
                    <s:iterator id="m" value="#request.allMajor">
                        <option value="<s:property value="#m.majorId" />">
                            <s:property value="#m.majorName"/>
                        </option>
                    </s:iterator>
                </select></td>
            </tr>
            <tr>
                <td class="x_td_th1"> 出生时间：</td>
                <td class="x_td_th2"><input type="text" name="student.birth" value="<%=stu.getBirth()%>"/></td>
            </tr>
            <tr>
                <td class="x_td_th1"> 总学分：</td>
                <td class="x_td_th2"><input type="text" name="student.totalCredit" value="<%=stu.getTotalCredit()%>"/>
                </td>
            </tr>
            <tr>
                <td class="x_td_th1"> 备注：</td>
                <td class="x_td_th2"><input type="text" name="student.note" value="<%=stu.getNote()%>"/></td>
            </tr>
            <tr>
                <td><input type="submit" value="修改" onClick="if(!confirm('您确定修改该信息吗?'))return false ; else return true;"/></td>
            </tr>
        </table>

    </s:form>
    <!-- /. NAV SIDE  -->
    <div id="page-wrapper">

        <!-- /. PAGE WRAPPER  -->
    </div>
    <!-- /. WRAPPER  -->
    <!-- JS Scripts-->
    <!-- jQuery Js -->
    <script src="js/jquery-1.10.2.js"></script>
    <!-- Bootstrap Js -->
    <script src="js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
    <script src="js/jquery.metisMenu.js"></script>
    <!-- Morris Chart Js -->
    <script src="js/morris/raphael-2.1.0.min.js"></script>
    <script src="js/morris/morris.js"></script>
    <!-- Custom Js -->
    <script src="js/custom-scripts.js"></script>


</body>

</html>
